<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>后台管理系统</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="../css/global.css?t=1488795362026" media="all">
<link rel="stylesheet" href="../css/layui.css?t=1488795362026"  >
<link rel="stylesheet" href="../css/fm.tagator.jquery.css"/>
<script src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../umeditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="../umeditor/ueditor.all.js"> </script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="../umeditor/lang/zh-cn/zh-cn.js"></script>
<script src="../js/fm.tagator.jquery.js"></script>
<link href="../css/select2.min.css" rel="stylesheet" />
<script src="../js/select2.min.js"></script>

</head>
<body>
<div class="layui-layout layui-layout-admin">
		<div class="layui-header header header-demo">
				<div class="layui-main"> <a class="logo" href="/"> </a>
						<ul class="layui-nav" pc>
								<li class="right"> <span> 用户：jiadangwei</span><a href="/doc/" class="out">退出</a> </li>
						</ul>
				</div>
		</div>
		<div class="layui-side layui-bg-black">
				<div class="layui-side-scroll">
						<ul class="layui-nav layui-nav-tree site-demo-nav">
								<li class="layui-nav-item layui-nav-itemed"> <a class="javascript:;" href="javascript:;">开发工具</a>
										<dl class="layui-nav-child">
												<dd class="layui-this"> <a href="/demo/button.html">按钮组</a> </dd>
												<dd class=""> <a href="/demo/form.html">表单集合</a> </dd>
												<dd class=""> <a href="/demo/nav.html">导航与面包屑</a> </dd>
										</dl>
								</li>
								<li class="layui-nav-item layui-nav-itemed"> <a class="javascript:;" href="javascript:;">基本元素</a>
										<dl class="layui-nav-child">
												<dd class=""> <a href="/demo/button.html">按钮组</a> </dd>
												<dd class=""> <a href="/demo/form.html">表单集合</a> </dd>
												<dd class=""> <a href="/demo/nav.html">导航与面包屑</a> </dd>
										</dl>
								</li>
								<li class="layui-nav-item" style="height: 30px; text-align: center"></li>
						</ul>
				</div>
		</div>
		<div class="layui-tab layui-tab-brief" lay-filter="demoTitle">
				<div class="layui-body layui-tab-content site-demo site-demo-body">
				<div class="gz_search">
                        <form class="layui-form" action="/review/list">
                            <label style="float: left; display: inline-block; line-height: 40px; margin-right: 10px;;">被评论体类型：</label>
                            <div class="layui-input-inline" style="width:120px; float: left; margin-right: 10px;">
                                <select name="type" lay-verify="required">
                                    <option value="0">全部</option>
                                    <option value="1">图文</option>
                                    <option value="2">视频</option>
                                    <option value="3">直播</option>
                                    <option value="4">系列</option>
                                </select><div class="layui-unselect layui-form-select"><div class="layui-select-title"><input type="text" placeholder="全部" value="全部" readonly="" class="layui-input layui-unselect"><i class="layui-edge"></i></div><dl class="layui-anim layui-anim-upbit"><dd lay-value="0" class="layui-this">全部</dd><dd lay-value="1" class="">图文</dd><dd lay-value="2" class="">视频</dd><dd lay-value="3" class="">直播</dd><dd lay-value="4" class="">系列</dd></dl></div>
                            </div>
                            <label style="float: left; display: inline-block; line-height: 40px; margin-right: 10px;">被评论体ID：</label>
                            <input type="text" name="parentId" value="" placeholder="请输入ID" autocomplete="off" class="layui-input" style="width:200px; float:left; margin-right: 10px;">
                            <label style="float: left; display: inline-block; line-height: 40px; margin-right: 10px;;">评论用户ID：</label>
                            <input type="text" name="userId" value="" placeholder="请输入ID" autocomplete="off" class="layui-input" style="width:200px; float:left;margin-right: 10px;">
                            <button class="layui-btn">搜&nbsp;&nbsp;&nbsp;索</button>
                        </form>
                    </div>
						<div class="mian">
								<form class="layui-form enen" action="../../up.php">
										<div class="layui-form-item">
												<label class="layui-form-label">标题：</label>
												<div class="layui-input-block">
														<input type="text" name="title" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input" style="width:400px;">
												</div>
										</div>
										<div class="layui-form-item">
												<label class="layui-form-label">所属频道：</label>
												<div class="layui-input-inline">
														<select name="modules" lay-verify="required" lay-search="">
																<option value="">直接选择或搜索选择</option>
																<option value="1">layer</option>
																<option value="2">form</option>
																<option value="3">layim</option>
																<option value="4">element</option>
																<option value="5">laytpl</option>
																<option value="6">upload</option>
																<option value="7">laydate</option>
																<option value="8">laypage</option>
																<option value="9">flow</option>
																<option value="10">util</option>
																<option value="11">code</option>
																<option value="12">tree</option>
																<option value="13">layedit</option>
																<option value="14">nav</option>
																<option value="15">tab</option>
																<option value="16">table</option>
																<option value="17">select</option>
																<option value="18">checkbox</option>
																<option value="19">switch</option>
																<option value="20">radio</option>
														</select>
												</div>
										</div>
										<div class="layui-form-item">
												<label class="layui-form-label">主页类型：</label>
												<div class="layui-input-inline">
														<select name="quiz">
																<option value="">请选择</option>
																<optgroup label="系列">
																<option value="老司机系列">老司机系列</option>
																<option value="二次元系列">二次元系列</option>
																</optgroup>
																<optgroup label="赛事">
																<option value="大甲2016">大甲2016</option>
																<option value="大乙2017">大乙2017</option>
																</optgroup>
																<optgroup label="机构">
																<option value="你的工号">中国银行</option>
																<option value="你最喜欢的老师">中国农业</option>
																</optgroup>
																<optgroup label="无">
																<option value="你的工号">你的工号</option>
																</optgroup>
														</select>
												</div>
										</div>
										<div class="layui-form-item">
												<label class="layui-form-label">作者：</label>
												<div class="layui-input-block">
														<input type="text" name="title2" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input" style="width:400px; float:left; margin-right:20px;">
														<a class="layui-btn">选择／新增</a> </div>
										</div>
										
										
										
										<div class="layui-form-item">
												<label class="layui-form-label">复选框</label>
												<div class="layui-input-block">
														<input type="checkbox" name="like1[write]" lay-skin="primary" title="列表页置顶" checked="">
														<input type="checkbox" name="like1[read]" lay-skin="primary" title="推荐到首页feed流">
												</div>
										</div>
										<div class="layui-form-item">
												<label class="layui-form-label">关键字：</label>
												<div class="keyword">
												  <select id="e9" style="width:400px"  class="js-example-tags form-control" multiple="multiple">
												    <option></option>
													
													
												</select>
												</div>
										</div>
										<div class="layui-form-item ">
												<label class="layui-form-label">关键字：</label>
												<div class="layui-input-block tab_radio">
													  <input type="radio" name="sex" value="0" title="图片" checked="">
													  <input type="radio" name="sex" value="1" title="视频">
												</div>
										</div>
										<div class="layui-form-item none show" tagbox>
												<label class="layui-form-label">图片上传：</label>
												<div style="margin-left:110px;">
														<div class="img btn_upload" > <img src="images/tp/img_load.png">
																<div class="layui-input-block" style="opacity:0" >
																		<input name="img_2" type="hidden" value="" class="_up_bg">
																		<input type="file" name="file1" lay-type="file" class="layui-upload-file" style="width:263px; height:165px; " >
																</div>
														</div>
												</div>
										</div>
										<div class="layui-form-item none" tagbox>
												<label class="layui-form-label">视频上传：</label>
												<div style="margin-left:110px;">
														<div class="img btn_upload" > <img src="images/tp/img_load.png">
																<div class="layui-input-block" style="opacity:0" >
																		<input name="img_2" type="hidden" value="" class="_up_bg">
																		<input type="file" name="file1" lay-type="file" class="layui-upload-file" style="width:263px; height:165px; " >
																</div>
														</div>
												</div>
										</div>
										
										<div class="layui-form-item layui-form-text">
												<label class="layui-form-label">描述:</label>
												<div class="layui-input-block"> 
														<textarea id="editor" name="editor" style="width:100%;height:300px;">锁定锁定锁定锁定</textarea>
												</div>
										</div>
										<div class="layui-form-item">
												<div class="layui-input-block">
														<button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
														<button type="reset" class="layui-btn layui-btn-primary">重置</button>
												</div>
										</div>
								</form>
						</div>
				</div>
		</div>
		<div class="layui-footer footer footer-demo">
				<div class="layui-main">
						<p>2017 &copy; <a href="/">layui.com</a> MIT license</p>
				</div>
		</div>
		<div class="site-tree-mobile layui-hide"> <i class="layui-icon">&#xe602;</i> </div>
		<div class="site-mobile-shade"></div>
</div>
<script src="../layui.js"></script> 
<script src="../js/fun.js"></script>
<script>
$(".btn_upload").each(function(index, element) {
	var btn=$(this).find("img");
	var file=$(this).find(".layui-upload-file");
	btn.click(function(){
		file.click();
		window.self=$(this)
	})
	layui.use('upload', function(){
	  layui.upload({
		url: 'json/upload.php'
		,elem: file //指定原始元素，默认直接查找class="layui-upload-file"
		,method: 'post' //上传接口的http类型
		,success: function(res){
			$(window.self).parents(".btn_upload").find("[type=hidden]").val(res.data.src)
			$(window.self).parents(".btn_upload").find("img").attr("src",res.data.src)
		}
	  });
	});
});

layui.use('form', function(){
  var form = layui.form();
  form.on('switch(switchTest)', function(data){
    layer.tips('开关checked：'+ (this.checked ? 'true' : 'false'), data.othis)
  });
  //监听提交
  form.on('submit(formDemo)', function(data){
    //layer.msg(JSON.stringify(data.field));
	data.field.e9=$("#e9").val()
	$.ajax({
		url: "json/bm.php",
		data:data.field,
		type: "POST",
		dataType: "json",
		success: function(data) {
			layer.msg(data.resmsg);
		},
		error: function(er) {
			BackErr(er);
		}
	});
    return false;
  });
});
var ue = UE.getEditor('editor');
$("#e9").select2({
	tags: true,
	placeholder: "Select a state",
   allowClear: true
});
//必须在提交前很渲染编辑器；  

</script>
</body>
</html>
